package com.nanyang.tms.api.dto.request.cost.add;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>Description:(成本价格重量模板明细表)</p>
 *
 * @author lv
 * @date 2022年11月12日 下午04:53:19
 * @Copyright Copyright (c) 2020 www.nanyang.cn Inc. All rights reserved.
 */
@Data
public class CostWeightRecordAddRequest implements Serializable {


    /**
     * 重量模板明细编号
     */
    @NotEmpty(message = "重量模板明细编号不能为空")
    @Length(max = 32, message = "weightRecordNo长度需小于32个字符")
    private String weightRecordNo;
    /**
     * 重量段标题
     */
    @NotEmpty(message = "重量段标题不能为空")
    @Length(max = 50, message = "weightRecordName长度需小于50个字符")
    private String weightRecordName;

    /**
     * 计费种类编码
     */
    @NotEmpty(message = "计费种类编码不能为空")
    @Length(max = 20, message = "chargingCode长度需小于20个字符")
    private String chargingCode;

    /**
     * 计费种类名称
     */
    @NotEmpty(message = "计费种类名称不能为空")
    @Length(max = 30, message = "chargingName长度需小于30个字符")
    private String chargingName;

    /**
     * 开始重量
     */
    @NotNull(message = "开始重量不能为空")
    @Digits(integer = 9, fraction=3, message = "weightStart格式不正确")
    @DecimalMin(value = "0.00", message = "weightStart格式不正确")
    private BigDecimal weightStart;

    /**
     * 截至重量
     */
    @NotNull(message = "截至重量不能为空")
    @Digits(integer = 9, fraction=3, message = "weightEnd格式不正确")
    @DecimalMin(value = "0.00", message = "weightEnd格式不正确")
    private BigDecimal weightEnd;

    /**
     * 计费单重
     */
    @NotNull(message = "计费单重不能为空")
    @Digits(integer = 9, fraction=3, message = "weightCharging格式不正确")
    @DecimalMin(value = "0.00", message = "weightCharging格式不正确")
    private BigDecimal weightCharging;
}